import pathlib
files=pathlib.Path(".")
g=files.rglob("*.*")
efp=open("errors.txt","w")
for f in g:
    if(str(f).startswith("build")):
        continue
    print(f,end='\r')
    try:
        with open(f) as fp:
            c=fp.readlines()
            for i,l in enumerate(c):
                if("redmi" in c):
                    print("**FOUND**",i,l,f)
    except Exception as e:
        print("\n",e,file=efp)
efp.close()